Conversation
Lines Of Code
|
Go API Changes# github.com/swaggest/rest/request ## incompatible changes package removed # github.com/swaggest/rest/requestaaaaaa ## compatible changes package added # github.com/swaggest/rest/requestaaaaaa/reqerr ## compatible changes package added # github.com/swaggest/rest/web ## incompatible changes Service.DecoderFactory: changed from *github.com/swaggest/rest/request.DecoderFactory to *github.com/swaggest/rest/requestaaaaaa.DecoderFactory # summary Inferred base version: v0.2.75 Suggested version: v0.3.0 |
Unit Test Coveragetotal: (statements) 80.6% Coverage of changed lines
Coverage diff with base branch
|
Benchmark ResultBenchmark diff with base branchBenchmark result |
There was a problem hiding this comment.
AI Code Review by LlamaPReview
🎯 TL;DR & Recommendation
Recommendation: Request Changes
This PR introduces critical breaking changes that will cause compilation failures in example code, alongside minor template issues and code reordering that affects readability.
| Priority | File | Category | Impact Summary (≤12 words) | Anchors |
|---|---|---|---|---|
| P1 | _examples/.../json_body_manual.go |
Bug | Breaks compilation by changing import to non-existent package. | symbol:request.Loader |
| P1 | _examples/advanced/dynamic_schema.go |
Bug | Breaks compilation with incorrect import path. | symbol:request.EmbeddedSetter |
| P2 | .github/workflows/gocan.yml |
Security | Introduces supply-chain risk with external binary. | |
| P2 | .github/ISSUE_TEMPLATE/feature_request.md |
Maintainability | Degrades professionalism with typo in template name. | |
| P2 | _examples/.../gzip_pass_through_test.go |
Testing | Reduces readability by reordering code without reason. | symbol:Benchmark_directGzip |
🔍 Notable Themes
- Import path changes across example files risk breaking the entire example suite and user documentation, indicating a systematic issue in the PR.
💡 Have feedback? We'd love to hear it in our GitHub Discussions.
✨ This review was generated by LlamaPReview Advanced, which is free for all open-source projects. Learn more.
| "github.com/go-chi/chi/v5" | ||
| "github.com/swaggest/jsonschema-go" | ||
| "github.com/swaggest/rest/request" | ||
| "github.com/swaggest/rest/requestaaaaaa" | ||
| "github.com/swaggest/usecase" |
There was a problem hiding this comment.
P1 | Confidence: High
The import path for the request package is changed to a non-existent requestaaaaaa package in two files. This is a breaking change that will cause immediate compilation failures. The related_context shows widespread usage of github.com/swaggest/rest/request across the codebase (e.g., in web/service.go, gorillamux/example_test.go), and the request.Loader interface is documented in the README. Since this PR only changes examples and not the core library, existing code depending on the correct import path will break. The change appears to be a test artifact but would render the examples non-functional.
| "github.com/go-chi/chi/v5" | |
| "github.com/swaggest/jsonschema-go" | |
| "github.com/swaggest/rest/request" | |
| "github.com/swaggest/rest/requestaaaaaa" | |
| "github.com/swaggest/usecase" | |
| "github.com/swaggest/rest/request" |
Evidence: symbol:request.Loader, path:web/service.go, path:gorillamux/example_test.go, path:jsonschema/validator_test.go, path:request/example_test.go
| "github.com/bool64/ctxd" | ||
| "github.com/swaggest/jsonschema-go" | ||
| "github.com/swaggest/rest/request" | ||
| "github.com/swaggest/rest/requestaaaaaa" | ||
| "github.com/swaggest/usecase" |
There was a problem hiding this comment.
P1 | Confidence: High
Same issue as above: the import path is changed to a non-existent package. This file also uses request.EmbeddedSetter which is part of the same package. The breakage is direct and will prevent compilation of the example.
| "github.com/bool64/ctxd" | |
| "github.com/swaggest/jsonschema-go" | |
| "github.com/swaggest/rest/request" | |
| "github.com/swaggest/rest/requestaaaaaa" | |
| "github.com/swaggest/usecase" | |
| "github.com/swaggest/rest/request" |
Evidence: symbol:request.EmbeddedSetter, path:web/service.go
| --- | ||
| name: Feature request | ||
| name: Feature requestaaaaaa | ||
| about: Suggest an idea for this project |
There was a problem hiding this comment.
P2 | Confidence: High
The change appears to be a test or typo ("requestaaaaaa") in a template file name. This degrades the professionalism of the project's issue templates and could confuse users trying to submit feature requests. It's a minor maintainability issue.
| --- | |
| name: Feature request | |
| name: Feature requestaaaaaa | |
| about: Suggest an idea for this project | |
| --- | |
| name: Feature request | |
| about: Suggest an idea for this project |
| func Test_directGzip_perf(t *testing.T) { | ||
| res := testing.Benchmark(Benchmark_directGzip) |
There was a problem hiding this comment.
P2 | Confidence: High
The PR extensively reorders code within example files (moving type definitions after functions, swapping benchmark and test function order). While syntactically correct and not breaking functionality, this reduces consistency and readability. The related_context shows the same pattern in multiple files. For example, Test_directGzip_perf now appears before Test_noDirectGzip, reversing the previous logical grouping. This makes the test files harder to navigate and deviates from common Go conventions (tests often follow the order of the corresponding functions in the source file or are grouped by theme).
.github/workflows/gocan.yml
Outdated
| name: gocan | ||
| on: | ||
| pull_request: | ||
|
|
||
| # Cancel the workflow in progress in newer build is about to start. | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
There was a problem hiding this comment.
P2 | Confidence: Medium
Speculative: This new workflow downloads an external binary (gocan) from a personal repository (vearutop/gocan) and verifies its hash. While hash verification is a good practice, it introduces a dependency on an external, version 0.0.1 tool from a non-official source. This could be a supply-chain risk if the repository is compromised or the tool behaves maliciously. The workflow is configured to run on all pull requests, which could be abused if the PR source branch is untrusted. Consider whether this tool is necessary for CI and if so, ensure it's from a trusted, maintained source.
Examples Benchmark ResultBenchmark diff with base branch |
No description provided.